 $LOAD_PATH.unshift File.join(File.dirname(__FILE__),'../..','ext_pr1/lib')
 require 'ext_pr1_v4'

# sum ::= (var) :: Nat x Nat -> Nat
# 
 def sum(seq) 
   check_pre((seq.nat?))
   (0..seq).reduce(:+)
 end
 
 def potenz(x, n)
   (n..x).reduce(:*)
 end
